package com.wlsk.license.controller.plate;


import com.wlsk.license.common.result.Result;
import com.wlsk.license.dto.request.GeneratePlateReqDto;
import com.wlsk.license.dto.request.PlateBaseReqDto;
import com.wlsk.license.dto.response.GenerateCheckDetailResultDto;
import com.wlsk.license.dto.response.GeneratePlateResDto;
import com.wlsk.license.service.IPlateGenerateService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@AllArgsConstructor
@Api(tags = "包车牌生成")
@RequestMapping("/plate/generate")
public class PlateGenerateController {

    @Autowired
    private IPlateGenerateService plateGenerateService;
    @ApiOperation(value = "生成包车牌前核对信息详情")
    @PostMapping("/checkDetail")
    public Result<GenerateCheckDetailResultDto> checkDetail(@RequestBody PlateBaseReqDto reqDto) {
        log.info("包车牌审核结果回调:{}", reqDto);
        return Result.success(plateGenerateService.checkDetail(reqDto));
    }
}
